package cn.com.bluemoon.daps.sync.core.sync.sql.mysql.datatype.date;

import java.util.Collections;
import java.util.Set;

/**
 * @author Jarod.Kong
 * @date 2021/7/22 11:14
 */
public class TimeDataType extends DateAndTimeDataType {
    /**
     * 默认值处理
     * 是否加单引号 等
     * <a href="https://dev.mysql.com/doc/refman/8.0/en/time.html">参考</a>
     * hh:mm:ss
     *
     * @param defaultValue source
     * @return target
     */
    @Override
    public Object cast(Object defaultValue) {
        return wrapper(defaultValue, SINGLE_QUOTE);
    }

    @Override
    public Set<String> name() {
        return Collections.singleton("time");
    }
}
